package newsletterRouter

import (
	"github.com/Sir-yuChen/funAnalyse/api"
	"github.com/Sir-yuChen/funAnalyse/global"
	"github.com/Sir-yuChen/funAnalyse/middleware"
	"github.com/gin-gonic/gin"
)

type StockBulletinGroupRouter struct{}

func (co *StockBulletinGroupRouter) StockBulletinGroupApiRouter(Router *gin.RouterGroup) {
	commonJwtRouter := Router.Group(global.ROUTER_GROUP_MSG).Use(middleware.JWTAuth()).Use(middleware.CasbinMiddleware())
	api := api.ApiGroupApp.NewsletterApiGroup.StockUserGroupController
	{
		commonJwtRouter.GET(global.API_MSG_Bulletin_Group_GET.BasePath, middleware.CheckApiResourcesMiddleware(global.API_MSG_Bulletin_Group_GET), api.GetStockUserGroup)
		commonJwtRouter.POST(global.API_MGS_Bulletin_Group_INSERT.BasePath, middleware.CheckApiResourcesMiddleware(global.API_MGS_Bulletin_Group_INSERT), api.InsertStockUserGroup)
		commonJwtRouter.POST(global.API_MSG_Bulletin_Group_UPDATE.BasePath, middleware.CheckApiResourcesMiddleware(global.API_MSG_Bulletin_Group_UPDATE), api.UpdateStockUserGroup)
		commonJwtRouter.GET(global.API_MSG_Bulletin_Group_DEL.BasePath, middleware.CheckApiResourcesMiddleware(global.API_MSG_Bulletin_Group_DEL), api.DelStockUserGroup)
	}
}
